/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Structs.h.zapt

#pragma once

#include <app/data-model/DecodableList.h>
#include <app/data-model/List.h>
#include <app/data-model/Nullable.h>
#include <lib/core/DataModelTypes.h>
#include <lib/core/Optional.h>
#include <lib/core/TLV.h>
#include <lib/support/BitMask.h>

#include <clusters/shared/Structs.h>

#include <cstdint>

namespace chip
{
namespace app
{
	namespace Clusters
	{
		namespace ThreadNetworkDiagnostics
		{
			namespace Structs
			{
				namespace NeighborTableStruct
				{
					enum class Fields : uint8_t {
						kExtAddress = 0,
						kAge = 1,
						kRloc16 = 2,
						kLinkFrameCounter = 3,
						kMleFrameCounter = 4,
						kLqi = 5,
						kAverageRssi = 6,
						kLastRssi = 7,
						kFrameErrorRate = 8,
						kMessageErrorRate = 9,
						kRxOnWhenIdle = 10,
						kFullThreadDevice = 11,
						kFullNetworkData = 12,
						kIsChild = 13,
					};

					struct Type {
					public:
						uint64_t extAddress = static_cast<uint64_t>(0);
						uint32_t age = static_cast<uint32_t>(0);
						uint16_t rloc16 = static_cast<uint16_t>(0);
						uint32_t linkFrameCounter = static_cast<uint32_t>(0);
						uint32_t mleFrameCounter = static_cast<uint32_t>(0);
						uint8_t lqi = static_cast<uint8_t>(0);
						DataModel::Nullable<int8_t> averageRssi;
						DataModel::Nullable<int8_t> lastRssi;
						uint8_t frameErrorRate = static_cast<uint8_t>(0);
						uint8_t messageErrorRate = static_cast<uint8_t>(0);
						bool rxOnWhenIdle = static_cast<bool>(0);
						bool fullThreadDevice = static_cast<bool>(0);
						bool fullNetworkData = static_cast<bool>(0);
						bool isChild = static_cast<bool>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace NeighborTableStruct
				namespace OperationalDatasetComponents
				{
					enum class Fields : uint8_t {
						kActiveTimestampPresent = 0,
						kPendingTimestampPresent = 1,
						kMasterKeyPresent = 2,
						kNetworkNamePresent = 3,
						kExtendedPanIdPresent = 4,
						kMeshLocalPrefixPresent = 5,
						kDelayPresent = 6,
						kPanIdPresent = 7,
						kChannelPresent = 8,
						kPskcPresent = 9,
						kSecurityPolicyPresent = 10,
						kChannelMaskPresent = 11,
					};

					struct Type {
					public:
						bool activeTimestampPresent = static_cast<bool>(0);
						bool pendingTimestampPresent = static_cast<bool>(0);
						bool masterKeyPresent = static_cast<bool>(0);
						bool networkNamePresent = static_cast<bool>(0);
						bool extendedPanIdPresent = static_cast<bool>(0);
						bool meshLocalPrefixPresent = static_cast<bool>(0);
						bool delayPresent = static_cast<bool>(0);
						bool panIdPresent = static_cast<bool>(0);
						bool channelPresent = static_cast<bool>(0);
						bool pskcPresent = static_cast<bool>(0);
						bool securityPolicyPresent = static_cast<bool>(0);
						bool channelMaskPresent = static_cast<bool>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace OperationalDatasetComponents
				namespace RouteTableStruct
				{
					enum class Fields : uint8_t {
						kExtAddress = 0,
						kRloc16 = 1,
						kRouterId = 2,
						kNextHop = 3,
						kPathCost = 4,
						kLQIIn = 5,
						kLQIOut = 6,
						kAge = 7,
						kAllocated = 8,
						kLinkEstablished = 9,
					};

					struct Type {
					public:
						uint64_t extAddress = static_cast<uint64_t>(0);
						uint16_t rloc16 = static_cast<uint16_t>(0);
						uint8_t routerId = static_cast<uint8_t>(0);
						uint8_t nextHop = static_cast<uint8_t>(0);
						uint8_t pathCost = static_cast<uint8_t>(0);
						uint8_t LQIIn = static_cast<uint8_t>(0);
						uint8_t LQIOut = static_cast<uint8_t>(0);
						uint8_t age = static_cast<uint8_t>(0);
						bool allocated = static_cast<bool>(0);
						bool linkEstablished = static_cast<bool>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace RouteTableStruct
				namespace SecurityPolicy
				{
					enum class Fields : uint8_t {
						kRotationTime = 0,
						kFlags = 1,
					};

					struct Type {
					public:
						uint16_t rotationTime = static_cast<uint16_t>(0);
						uint16_t flags = static_cast<uint16_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace SecurityPolicy
			} // namespace Structs
		} // namespace ThreadNetworkDiagnostics
	} // namespace Clusters
} // namespace app
} // namespace chip
